# -*- coding: utf-8 -*-
# @Time : 2023/11/13 12:32
# @Author : yuancheng
# @File : 猜数字游戏.py.py
import random as rd
number=rd.randint(0,100)
for i in range(10):
    choice=int(input("请输入您猜的数"))
    if choice>number:
       print("您猜的数大了")
    elif choice<number:
         print("您猜的数小了")
    else:
         print("您猜对了")
         print(f'你一共用了{i+1}次机会')
         break
    print(f'还剩{9-i}次机会')
else:
     print('游戏结束，你没有猜到')
